package com.hogwarts.demo;

import java.io.UnsupportedEncodingException;

public class MyUrlDecodeMethod {

    public static String getURLDecoderString(String str) {
        String result = "";
        if (null == str) {
            return "";
        }
        try {
            result = java.net.URLDecoder.decode(str, "UTF-8");
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
        }
        return result;
    }

    public static void main(String[] args) {
        String data = getURLDecoderString("%25");
        System.out.println(data);
    }
}
